#include "config.h"


// 第1层全连接
void lenet_fc1(
    INT16 d_in[FC1_IN_SIZE],
    INT16 d_out[FC1_OUT_SIZE],
    INT16 weights[FC1_OUT_SIZE][FC1_IN_SIZE],
    INT16 bias[FC1_OUT_SIZE]
    ){
    
    for (int i = 0; i < FC1_OUT_SIZE; i++){
        INT32 tmp = 0;
        for (int j = 0; j < FC1_IN_SIZE; j++){
            tmp += d_in[j] * weights[i][j];
        }
        d_out[i] = RELU((tmp >> 8) + bias[i]);
    }
}
